<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>em</title>
    <style>

        .div1 {
            height: 10em;
            width: 10em;
            font-size: 20px;
            background-color: lightblue;
        }

        .div2 {
            /*height: 5em;
            width: 5em;*/

            /*先看自己有没有设置font-size,没设置找父元素的*/
            font-size: 10px;
            height: 10em;
            width: 10em;

            background-color: lightpink;
        }
        .div3{
            background-color: lightgreen;
            height: 100px;
            width: 100px;
        }
    </style>
</head>
<body>
<div class="div1">
    <div class="div2"></div>
    <div class="div3"></div>
</div>

</body>
</html>

